local que_jilin = fk.CreateSkill {
    name = "que_jilin",
    anim_type = "control",
}
Fk:loadTranslationTable {
    ["que_jilin"] = "迹遴",
    [":que_jilin"] = "出牌阶段限一次，当你使用一张基本牌时，你可以摸一张牌并选择一项：1.此牌基础数值+1；2.此牌额外结算一次。",

    ["#que_jilin-invoke"] = "迹遴：是否令 %arg 基值+1或额外结算一次？",
}
que_jilin:addEffect(fk.CardUsing, {
    anim_type = "support",
    can_trigger = function(self, event, target, player, data)
        return player:hasSkill(que_jilin.name) and
            data.card.type == Card.TypeBasic and target == player and player.phase ~= Player.NotActive and
            player:usedSkillTimes(que_jilin.name, Player.HistoryTurn) == 0
    end,
    on_cost = function(self, event, target, player, data)
        local room = player.room
        return room:askToSkillInvoke(player, {
            skill_name = que_jilin.name,
            prompt = "#que_jilin-invoke:::" .. data.card:toLogString(),
        })
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        player:drawCards(1, que_jilin.name)
        if room:askToChoice(player, { choices = { "数值加一", "额外结算" }, skill_name = que_jilin.name }) == "数值加一" then
            if data.card.is_damage_card then
                data.additionalDamage = (data.additionalDamage or 0) + 1
            elseif data.card.name == "peach" then
                data.additionalRecover = (data.additionalRecover or 0) + 1
            elseif data.card.name == "analeptic" then
                if data.extra_data and data.extra_data.analepticRecover then
                    data.additionalRecover = (data.additionalRecover or 0) + 1
                else
                    data.extra_data = data.extra_data or {}
                    data.extra_data.additionalDrank = (data.extra_data.additionalDrank or 0) + 1
                end
            end
        else
            data.additionalEffect = (data.additionalEffect or 0) + 1
        end
    end,
})
return que_jilin
